package com.rongc.client.freight.business.waybill.model;

import com.google.gson.annotations.SerializedName;
import com.rongc.client.core.utils.StringUtils;

import java.io.Serializable;

/**
 * Created by Bruce on 2017/06/24.
 */
public class WayBillBean implements Serializable {

    @SerializedName("createtime")
    String createtime;
    @SerializedName(value = "carmodels",alternate = {"model"})
    String carmodels;
    @SerializedName("startplace")
    String startplace;
    @SerializedName("waystate")
    String waystate;
    @SerializedName("orderid")
    String orderid;
    @SerializedName("type")
    String type;
    @SerializedName(value = "carlength",alternate = {"length"})
    String carlength;
    @SerializedName("endplace")
    String endplace;

    @SerializedName("dulk")
    String dulk;
    @SerializedName(value = "weights",alternate = {"carLoad","carload"})
    String weights; // 重量
    @SerializedName("gid")
    String gid;
    @SerializedName("start_ssq")
    String start_ssq; //
    @SerializedName("end_ssq")
    String end_ssq; //
    @SerializedName("carId")
    String carId; //
    @SerializedName("trucksId")
    String trucksId; //
    @SerializedName("loadtime")
    String loadtime; //


    public String getCreatetime() {
        return createtime;
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    public String getCarmodels() {
        return carmodels;
    }

    public void setCarmodels(String carmodels) {
        this.carmodels = carmodels;
    }

    public String getStartplace() {
        if(StringUtils.isEmpty(startplace)) return getStart_ssq();
        return startplace;
    }

    public void setStartplace(String startplace) {
        this.startplace = startplace;
    }

    public String getEndplace() {
        if(StringUtils.isEmpty(endplace)) return getEnd_ssq();
        return endplace;
    }

    public void setEndplace(String endplace) {
        this.endplace = endplace;
    }

    public String getWaystate() {
        return waystate;
    }

    public void setWaystate(String waystate) {
        this.waystate = waystate;
    }


    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCarlength() {
        return carlength;
    }

    public void setCarlength(String carlength) {
        this.carlength = carlength;
    }

    public String getDulk() {
        String temp = StringUtils.parseDouble(dulk)+"";
        return temp;
    }

    public void setDulk(String dulk) {
        this.dulk = dulk;
    }

    public String getWeights() {
        return weights;
    }

    public void setWeights(String weights) {
        this.weights = weights;
    }

    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }

    public String getStart_ssq() {
        return start_ssq;
    }

    public void setStart_ssq(String start_ssq) {
        this.start_ssq = start_ssq;
    }

    public String getEnd_ssq() {
        return end_ssq;
    }

    public void setEnd_ssq(String end_ssq) {
        this.end_ssq = end_ssq;
    }

    public String getCarId() {
        return carId;
    }

    public void setCarId(String carId) {
        this.carId = carId;
    }

    public String getTrucksId() {
        return trucksId;
    }

    public void setTrucksId(String trucksId) {
        this.trucksId = trucksId;
    }

    public String getLoadtime() {
        return loadtime;
    }

    public void setLoadtime(String loadtime) {
        this.loadtime = loadtime;
    }
}
